Skip to main content

Full text of "Arduino"

See other formats


Halloween Skeleton 



i 



Make Projects 



build, hack, tweak, share, discover,' 



Halloween Skeleton 



Written By: conorml25 



O PARTS: 

Arduino Duemilanove (1) 
Servo (generic) (1) 
Breadboard kit (1) 
Halloween mask (1) 
LEDs(1) 



SUMMARY 

In this guide we use a Halloween skeleton mask, an Arduino Duemilanove, a servo and 
some LEDs to create the ultimate skeleton Halloween decoration. 



© Make Projects www.makeprojects.com Page 1 of 3 



Halloween Skeleton 





• Attach your servo to your mask. 
You may need to add wood or 
something for support. 



Step 2 

• Optional : Add LEDs in the eyes. 

• If you add LEDs the positive/red goes to the Arduino's pin 13 and the 
negative/black/ground goes to the ground pin. 




• Now let's wire up the servo to our Arduino. 

• The Black wire goes to a ground pin. 

• The Red Goes To 5v Power 

• The Yellow/White/Orange goes to digital pin 9. 



© Make Projects 



www.makeprojects.com 



Page 2 of 3 



Halloween Skeleton 




^include <5ervo.h> 



Servo myseEvo; // create servo object to control a servo 



void setup ( ) 

{ 

myservo. attach[9) ; // attaches the servo on pin 9 to the servo object 



void loop ( ) 



myservo. write (90) ;//Digreae 1 to 180 

delay (1000); //Time in m. seconds 

myservo. write (180) ;//Digreae 1 to 180 

delay (1000); //Time in m. seconds 

myservo. write (90) ;//Digreae 1 to 180 

delay (1000); //Time in m. seconds 

> 



• Now plug your Arduino in and type 
this code: 

• // THIS IS FOR NO LEDs . 
#include <Servo.h> Servo 
myservo; // create servo 
object to control void 
setup ( ) { 

myservo . attach ( 9 ) ; // 
attaches servo to pin 9 } 
void loop( ) { 

myservo .write ( 90 ) ; //Degree 
1 to 180 delay(1000) ; 
//Time in milliseconds 
myservo .write ( 180 ) ; //Degree 
1 to 180 delay(1000) ; 
//Time in milliseconds 
myservo .write ( 90 ) ; //Degree 
1 to 180 delay(1000) ; 
//Time in milliseconds } 




You're finished! 

To add LEDs just add the code from the Arduino example called "blink." 



Now you have a skeleton decoration. 



This document was last generated on 201 2-1 1 -1 1 09:24:28 PM. 



© Make Projects 



www.makeprojects.com 



Page 3 of 3